<template>
  <div class="install">
    <Vheader title="反馈意见"></Vheader>
    <section class="main">
      <textarea class="feedback-textarea" placeholder="您的反馈是我们改进的动力，欢迎提出建议和意见，我们将尽快跟进提升用户体验"
                v-model="opinion"></textarea>
      <mt-button @click.native="feedback" type="primary" class="exit">确认</mt-button>
    </section>
  </div>
</template>

<script>
  import axios from '../../axios/axios'
  import {Toast} from 'mint-ui'
  import Vheader from '../../components/header.vue'

  export default {
    name: 'install',
    data() {
      return {
        content: '',
      }
    },
    methods: {
      feedback: function () {
        var that = this;
        var feedData = JSON.stringify({
          'actionName': 'insert',
          'controllerName': 'userFeedBack',
          'data': [{
            'content': this.content
          }]
        });
        axios.postAdmain({
          data: feedData,
          callback(res) {
            console.log(res.data);
            if (res.data.data.result === true) {
              that.$router.push('/install');
            } else {
              Toast(res.body.data.remark);
            }
          }
        })
      }
    },
    components: {Vheader}
  }
</script>
<style type="text/scss" lang="scss" scoped>
  @import "../../common/style/public";

  .feedback-textarea {
    display: block;
    width: 100%;
    height: 40vw;
    padding: 10px;
    outline: none;
    border: none;
    margin: auto;
    box-sizing: border-box;
  }

</style>







